CREATE TABLE [dbo].[TRINFO_GRUP]
(
[TI_INF1] [dbo].[TD_VC_008] NOT NULL,
[TI_INF2] [dbo].[TD_VC_008] NOT NULL,
[CO_GRUP] [dbo].[TD_VC_008] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TRINFO_GR__CO_US__6DCC4D03] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TRINFO_GR__FE_US__6EC0713C] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TRINFO_GR__CO_US__6FB49575] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TRINFO_GR__FE_US__70A8B9AE] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRINFO_GRUP] ADD CONSTRAINT [PK__TRINFO_G__37750475257187A8] PRIMARY KEY CLUSTERED  ([TI_INF1], [TI_INF2], [CO_GRUP], [CO_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRINFO_GRUP] ADD CONSTRAINT [FK__TRINFO_GRUP__45A94D10] FOREIGN KEY ([CO_GRUP], [CO_EMPR]) REFERENCES [dbo].[TREMPR_GRUP] ([CO_GRUP], [CO_EMPR])
GO
ALTER TABLE [dbo].[TRINFO_GRUP] ADD CONSTRAINT [FK__TRINFO_GRUP__44B528D7] FOREIGN KEY ([TI_INF1], [TI_INF2], [CO_EMPR]) REFERENCES [dbo].[TTTIPO_INF2] ([TI_INF1], [TI_INF2], [CO_EMPR])
GO
GRANT SELECT ON  [dbo].[TRINFO_GRUP] TO [public]
GRANT INSERT ON  [dbo].[TRINFO_GRUP] TO [public]
GRANT DELETE ON  [dbo].[TRINFO_GRUP] TO [public]
GRANT UPDATE ON  [dbo].[TRINFO_GRUP] TO [public]
GO
